class RadioButton {
    props = {
        value: String,
    };
    state = {
        checked: false,
    };
    constructor(essaRadioGroup) {
        essaRadioGroup.getContext().$watch("state.value", (newValue) => {
            if (newValue !== undefined) {
                this.state.checked = this.props.value === newValue;
            }
        });
    }
    handleChange(event) {
        let value = event.target.value;
        essaRadioGroup.getProps("handleChange")(value);
    }
}
